<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorate="main"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>指派销售机会</title>
    <link th:href="@{/localcss/crmlist.css}" href="../static/localcss/crmadd.css" rel="stylesheet">
</head>
<body>
<div layout:fragment="content">
    <div class="">
        <div class="clearfix"></div>
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>指派销售机会<i class="fa fa-user"></i></h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <div class="clearfix"></div>
                        <form class="form-horizontal form-label-left" th:action="@{/chance/assign}" action="/chance/assign" method="post">
                            <input name="chcId" type="hidden" th:value="${chance.chcId}">
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcCustName">编号<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcId}">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcCustName">客户名称<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcCustName}">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcLinkman">负责人<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcLinkman}">

                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcSource">机会来源<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcSource}">

                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcRate">成功机率(%)<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcRate}">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcTel">公司电话<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcTel}">

                                </div>
                            </div>

                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="chcTitle">概要<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcTitle}">

                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12"  for="chcDesc">机会描述<span class="required">*</span></label>
                                <div class="col-md-6 col-sm-6 col-xs-12" th:text="${chance.chcDesc}">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12"  for="chcDueId">指派给<span class="required">*</span></label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select name="chcDueId" id="chcDueId" class="form-control" required="required">
                                        <option th:selected="${chance.chcDueId ==user.usrId}" th:each="user:${userList}" th:value="${user.usrId}" th:text="${user.usrName}" value="">文本</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-6 col-md-offset-3">
                                    <button id="send" type="submit" class="btn btn-success">保存</button>
                                    <button type="button" class="btn btn-primary" id="back">返回</button>
                                    <br/><br/>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script layout:fragment="js">
    $(document).ready(function(){
        $("#back").on("click",function(){
            window.history.back();
        });
    });
</script>
</html>